

import com.itheima.health.pojo.CheckItem;
import com.itheima.health.pojo.User;
import com.ysx.dao.CheckItemDao;
import com.ysx.dao.UserDao;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class mytest {
    @Test
    public void test_01() {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-dao.xml");
       /* CheckItemDao bean = context.getBean(CheckItemDao.class);*/
        UserDao bean = context.getBean(UserDao.class);
        User xiaoming = bean.getUserByName("xiaoming");
        System.out.println(xiaoming);
    }

}
